package com.kehutong.common.entity;

import java.util.List;

import org.coraframework.orm.Entity;
import org.coraframework.orm.FilterAble;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.KeyType;

/**
 * 聊天室
 * 
 * @author liuzhen (liuxing521a@163.com)
 * @createTime 2020年5月26日 上午11:21:20
 */
public abstract class DataEntity extends Entity implements FilterAble {

	private static final long serialVersionUID = 2774570141766738957L;

	protected DataEntity(String id) {
		super(id);
	}

	@Column(comment="部门编号" , length=36, key=KeyType.KEY_INDEX)
	private String departmentNo;

	@Column(comment="部门名称")
	private String departmentName;
	
	@Column(dbType="varchar", length=255, comment="所有上级部门编号")
	private List<String> departmentNos;

	public String getDepartmentNo() {
		return departmentNo;
	}

	public void setDepartmentNo(String departmentNo) {
		this.departmentNo = departmentNo;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public List<String> getDepartmentNos() {
		return departmentNos;
	}

	public void setDepartmentNos(List<String> departmentNos) {
		this.departmentNos = departmentNos;
	}

	@Override
	public String offerFieldName() {
		return "departmentNo";
	}
	
	@Override
	public String offerTreeFieldName() {
		return "departmentNos";
	}
}
